<?php

use Illuminate\Database\Eloquent\SoftDeletingTrait;

class Template extends Eloquent {

	protected $fillable = array('template_name');
	
	use SoftDeletingTrait;

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'templates';

	protected $dates = ['deleted_at'];

	/**
     * Get the param a templates has
     */
    public function templateParams()
    {
        return $this->hasMany('TemplateParam');
    }

    public function document()
    {
        return $this->hasMany('Document');
    }
	
	public function departments() {
        return $this->belongsToMany('Department');
	}
	
	// public function setTemplateParams(listOfTemplateParam){
	
		// $this->teamplateParams();
	
	
	// }
	
}
